package com.view;

import javax.swing.*;
import java.awt.*;

public class textWindow extends JFrame {
    private JPanel jPanel;
    private JComboBox jComboBox;


    public textWindow(String title) throws HeadlessException{
        super(title);
        setSize(500, 600);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        init();
    }

    private void  init(){
        GridLayout layout = new GridLayout();
        jPanel = new JPanel(layout);

        //choose list
        String[] listData = new String[]{"person", "computer"};
        jComboBox = new JComboBox<>(listData);

        JButton button1 = new JButton("button1");
        JButton button2 = new JButton("button2");

        jPanel.add(button1);
        jPanel.add(jComboBox);
        jPanel.add(button2);

        setContentPane(jPanel);

    }

}
